FROM openshift/golang-builder@sha256:4820580c3368f320581eb9e32cf97aeec179a86c5749753a14ed76410a293d83
ENV __doozer=update BUILD_RELEASE=202202160023.p0.gdf0b27d.assembly.stream BUILD_VERSION=v4.10.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=10 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.10.0-202202160023.p0.gdf0b27d.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=df0b27d OS_GIT_VERSION=4.10.0-202202160023.p0.gdf0b27d.assembly.stream-df0b27d SOURCE_DATE_EPOCH=1642690654 SOURCE_GIT_COMMIT=df0b27de80cfaa3f01e8cf0210f3a8d0c9a248d9 SOURCE_GIT_TAG=v0.2.0-1077-gdf0b27de SOURCE_GIT_URL=https://github.com/openshift/cloud-provider-openstack 
WORKDIR /go/src/k8s.io/cloud-provider-openstack
COPY . .
RUN go build -o cinder-csi-plugin ./cmd/cinder-csi-plugin

FROM openshift/ose-base:v4.10.0.20220216.010142
ENV __doozer=update BUILD_RELEASE=202202160023.p0.gdf0b27d.assembly.stream BUILD_VERSION=v4.10.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=10 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.10.0-202202160023.p0.gdf0b27d.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=df0b27d OS_GIT_VERSION=4.10.0-202202160023.p0.gdf0b27d.assembly.stream-df0b27d SOURCE_DATE_EPOCH=1642690654 SOURCE_GIT_COMMIT=df0b27de80cfaa3f01e8cf0210f3a8d0c9a248d9 SOURCE_GIT_TAG=v0.2.0-1077-gdf0b27de SOURCE_GIT_URL=https://github.com/openshift/cloud-provider-openstack 

# Get mkfs & blkid
RUN yum update -y && \
    yum install --setopt=tsflags=nodocs -y e2fsprogs xfsprogs util-linux systemd-udev && \
    yum clean all && rm -rf /var/cache/yum/*

COPY --from=0 /go/src/k8s.io/cloud-provider-openstack/cinder-csi-plugin /usr/bin/

ENTRYPOINT ["/usr/bin/cinder-csi-plugin"]

LABEL \
        name="openshift/ose-openstack-cinder-csi-driver" \
        com.redhat.component="ose-openstack-cinder-csi-driver-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Installer" \
        io.openshift.maintainer.subcomponent="OpenShift on OpenStack" \
        release="202202160023.p0.gdf0b27d.assembly.stream" \
        io.openshift.build.commit.id="df0b27de80cfaa3f01e8cf0210f3a8d0c9a248d9" \
        io.openshift.build.source-location="https://github.com/openshift/cloud-provider-openstack" \
        io.openshift.build.commit.url="https://github.com/openshift/cloud-provider-openstack/commit/df0b27de80cfaa3f01e8cf0210f3a8d0c9a248d9" \
        version="v4.10.0"

